#include "../header/Client.h"
#include "qhostaddress.h"
Client::Client(QTcpSocket *_client,QString _name, bool _auto_conn)
{
	client = _client;
	if (client == NULL)
	{
		client = new QTcpSocket;
	}
	name = _name;
	auto_conn = _auto_conn;
}
QString Client::GetName()
{
	if (name == "")
	{
		return client->peerAddress().toString();
	}
	else
	{
		return name;
	}
}